﻿package  Classes{
	
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	
	public class DialogConfirm extends MovieClip {
		public function DialogConfirm() {
			btnOk.addEventListener(MouseEvent.CLICK,onOk);
			btnCancel.addEventListener(MouseEvent.CLICK,onCancel);
		}
		
		private function onOk(e:MouseEvent):void
		{
			Main.instance.dispatchEvent(new AnswerEvent(true));
		}
		
		private function onCancel(e:MouseEvent):void
		{
			Main.instance.dispatchEvent(new AnswerEvent(false));
		}
	}
	
}
